cmake_minimum_required(VERSION 2.6)

PROJECT(opengl3-freenode)

INCLUDE_DIRECTORIES(basecode/include)

SET(GLF_SRCS
basecode/src/glf.c
basecode/src/glfevent.c
basecode/src/glftime.c
basecode/src/glfwindow.c
basecode/src/glapif.c
)
ADD_LIBRARY(glf ${GLF_SRCS})

SET(GLFU_SRCS
basecode/src/glfu.c
basecode/src/glfushape.c
basecode/src/glfutga.c
)
ADD_LIBRARY(glfu ${GLFU_SRCS})

ADD_EXECUTABLE(1_empty samples/1_empty/empty.c)
TARGET_LINK_LIBRARIES(1_empty glf glfu Opengl32.lib)

ADD_EXECUTABLE(2_shader samples/2_shader/shader_program.c)
TARGET_LINK_LIBRARIES(2_shader glf glfu Opengl32.lib)

ADD_EXECUTABLE(3_buffer_object samples/3_buffer_object/buffer_object.c)
TARGET_LINK_LIBRARIES(3_buffer_object glf glfu Opengl32.lib)

ADD_EXECUTABLE(draw samples/draw/main.c)
TARGET_LINK_LIBRARIES(draw glf glfu Opengl32.lib)

ADD_EXECUTABLE(draw_elements samples/draw_elements/main.c)
TARGET_LINK_LIBRARIES(draw_elements glf glfu Opengl32.lib)

ADD_EXECUTABLE(draw_instanced samples/draw_instanced/main.c)
TARGET_LINK_LIBRARIES(draw_instanced glf glfu Opengl32.lib)

ADD_EXECUTABLE(extensions samples/extensions/main.c)
TARGET_LINK_LIBRARIES(extensions glf glfu Opengl32.lib)

ADD_EXECUTABLE(modelview_projection samples/modelview_projection/main.c)
TARGET_LINK_LIBRARIES(modelview_projection glf glfu Opengl32.lib)

ADD_EXECUTABLE(points samples/points/main.c)
TARGET_LINK_LIBRARIES(points glf glfu Opengl32.lib)

ADD_EXECUTABLE(primitive_restart samples/primitive_restart/main.c)
TARGET_LINK_LIBRARIES(primitive_restart glf glfu Opengl32.lib)

ADD_EXECUTABLE(query samples/query/main.c)
TARGET_LINK_LIBRARIES(query glf glfu Opengl32.lib)

ADD_EXECUTABLE(rasterizer_discard samples/rasterizer_discard/main.c)
TARGET_LINK_LIBRARIES(rasterizer_discard glf glfu Opengl32.lib)

ADD_EXECUTABLE(sampler2d samples/sampler2d/main.c)
TARGET_LINK_LIBRARIES(sampler2d glf glfu Opengl32.lib)

ADD_EXECUTABLE(scissor_test samples/scissor_test/main.c)
TARGET_LINK_LIBRARIES(scissor_test glf glfu Opengl32.lib)

ADD_EXECUTABLE(vao samples/vao/main.c)
TARGET_LINK_LIBRARIES(vao glf glfu Opengl32.lib)

ADD_EXECUTABLE(vbo samples/vbo/main.c)
TARGET_LINK_LIBRARIES(vbo glf glfu Opengl32.lib)

ADD_EXECUTABLE(vbo_elements samples/vbo_elements/main.c)
TARGET_LINK_LIBRARIES(vbo_elements glf glfu Opengl32.lib)

